import 'package:flutter/material.dart';
import 'package:jyofservice/bean/work_condition_entity.dart';

class WorkCondiTable extends DataTableSource {
  int _selectCount = 0; //当前选中的行数
  List posts;

  WorkCondiTable(this.posts);

  @override
  DataRow getRow(int index) {
    // TODO: implement getRow
     WorkConditionEntity workConditionEntity = posts[index];
    return DataRow.byIndex(index: index, cells: [
      DataCell(Text(workConditionEntity.title!)),
      DataCell(Text(workConditionEntity.neiRong!)),
      DataCell(Text(workConditionEntity.fanWeiName!)),
      DataCell(Text(workConditionEntity.endDt!)),
      DataCell(Text(workConditionEntity.createDate!)),
      DataCell(Text(workConditionEntity.realName!))

    ]);
  }

  @override
  // TODO: implement isRowCountApproximate
  bool get isRowCountApproximate => false;

  @override
  // TODO: implement rowCount
  int get rowCount => posts.length;

  @override
  // TODO: implement selectedRowCount
  int get selectedRowCount => _selectCount;
}
